#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    : 2023/10/9 23:06
# @function: the script is used to do something.
# @version :

"""
按照要求打印图形
    *
    **
    ***
    ****
    *****
"""
#
# i = 1
# while i <= 5:
#     print('*' * i)
#     i += 1

i = 1
while i <= 5:
    j = 1
    while j <= i:
        print('*', end=" ")
        j += 1
    print('\n')
    i += 1

"""
按照要求打印图形
X*Y=Z

X*Y=Z X*Y=Z

X*Y=Z X*Y=Z X*Y=Z

X*Y=Z X*Y=Z X*Y=Z X*Y=Z

X*Y=Z X*Y=Z X*Y=Z X*Y=Z X*Y=Z
"""

i = 1
while i <= 5:
    j = 1
    while j <= i:
        print('X*Y=Z', end=" ")
        j += 1
    print('\n')
    i += 1

"""
按照要求打印图形
1*1=Z

1*2=Z 2*2=Z

1*3=Z 2*3=Z 3*3=Z

1*4=Z 2*4=Z 3*4=Z 4*4=Z

1*5=Z 2*5=Z 3*5=Z 4*5=Z 5*5=Z
"""
i = 1
while i <= 5:
    j = 1
    while j <= i:
        print(f'{j}*{i}=Z', end=" ")
        j += 1
    print('\n')
    i += 1


# 乘法表
i = 1
while i <= 9:
    j = 1
    while j <= 9:
        print(f'{j}*{i}={j * i}', end=' ')
        j += 1
    print('\n')
    i += 1
